package org.gr.ias.common.entity;

import java.io.Serializable;
import java.util.Date;

public class Advertisement implements Serializable {
    /** id*/
    private String id;

    /** 栏位id*/
    private String advertisementAreaId;

    /** 广告名称*/
    private String advertisementName;

    /** 广告描述*/
    private String advertisementDesc;

    /** 链接地址*/
    private String url;

    /** 媒体地址*/
    private String referer;

    /** 上架时间*/
    private Date inTime;

    /** 下架时间*/
    private Date outTime;

    /** 是否弹出*/
    private String pop;

    /** 是否默认*/
    private String advertisementDefault;

    /** 创建人*/
    private String createUser;

    /** 修改人*/
    private String modifyUser;

    /** 创建时间*/
    private Date createTime;

    /** 修改时间*/
    private Date modifyTime;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getAdvertisementAreaId() {
        return advertisementAreaId;
    }

    public void setAdvertisementAreaId(String advertisementAreaId) {
        this.advertisementAreaId = advertisementAreaId == null ? null : advertisementAreaId.trim();
    }

    public String getAdvertisementName() {
        return advertisementName;
    }

    public void setAdvertisementName(String advertisementName) {
        this.advertisementName = advertisementName == null ? null : advertisementName.trim();
    }

    public String getAdvertisementDesc() {
        return advertisementDesc;
    }

    public void setAdvertisementDesc(String advertisementDesc) {
        this.advertisementDesc = advertisementDesc == null ? null : advertisementDesc.trim();
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url == null ? null : url.trim();
    }

    public String getReferer() {
        return referer;
    }

    public void setReferer(String referer) {
        this.referer = referer == null ? null : referer.trim();
    }

    public Date getInTime() {
        return inTime;
    }

    public void setInTime(Date inTime) {
        this.inTime = inTime;
    }

    public Date getOutTime() {
        return outTime;
    }

    public void setOutTime(Date outTime) {
        this.outTime = outTime;
    }

    public String getPop() {
        return pop;
    }

    public void setPop(String pop) {
        this.pop = pop == null ? null : pop.trim();
    }

    public String getAdvertisementDefault() {
        return advertisementDefault;
    }

    public void setAdvertisementDefault(String advertisementDefault) {
        this.advertisementDefault = advertisementDefault == null ? null : advertisementDefault.trim();
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    public String getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser == null ? null : modifyUser.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Advertisement other = (Advertisement) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAdvertisementAreaId() == null ? other.getAdvertisementAreaId() == null : this.getAdvertisementAreaId().equals(other.getAdvertisementAreaId()))
            && (this.getAdvertisementName() == null ? other.getAdvertisementName() == null : this.getAdvertisementName().equals(other.getAdvertisementName()))
            && (this.getAdvertisementDesc() == null ? other.getAdvertisementDesc() == null : this.getAdvertisementDesc().equals(other.getAdvertisementDesc()))
            && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
            && (this.getReferer() == null ? other.getReferer() == null : this.getReferer().equals(other.getReferer()))
            && (this.getInTime() == null ? other.getInTime() == null : this.getInTime().equals(other.getInTime()))
            && (this.getOutTime() == null ? other.getOutTime() == null : this.getOutTime().equals(other.getOutTime()))
            && (this.getPop() == null ? other.getPop() == null : this.getPop().equals(other.getPop()))
            && (this.getAdvertisementDefault() == null ? other.getAdvertisementDefault() == null : this.getAdvertisementDefault().equals(other.getAdvertisementDefault()))
            && (this.getCreateUser() == null ? other.getCreateUser() == null : this.getCreateUser().equals(other.getCreateUser()))
            && (this.getModifyUser() == null ? other.getModifyUser() == null : this.getModifyUser().equals(other.getModifyUser()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAdvertisementAreaId() == null) ? 0 : getAdvertisementAreaId().hashCode());
        result = prime * result + ((getAdvertisementName() == null) ? 0 : getAdvertisementName().hashCode());
        result = prime * result + ((getAdvertisementDesc() == null) ? 0 : getAdvertisementDesc().hashCode());
        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
        result = prime * result + ((getReferer() == null) ? 0 : getReferer().hashCode());
        result = prime * result + ((getInTime() == null) ? 0 : getInTime().hashCode());
        result = prime * result + ((getOutTime() == null) ? 0 : getOutTime().hashCode());
        result = prime * result + ((getPop() == null) ? 0 : getPop().hashCode());
        result = prime * result + ((getAdvertisementDefault() == null) ? 0 : getAdvertisementDefault().hashCode());
        result = prime * result + ((getCreateUser() == null) ? 0 : getCreateUser().hashCode());
        result = prime * result + ((getModifyUser() == null) ? 0 : getModifyUser().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", advertisementAreaId=").append(advertisementAreaId);
        sb.append(", advertisementName=").append(advertisementName);
        sb.append(", advertisementDesc=").append(advertisementDesc);
        sb.append(", url=").append(url);
        sb.append(", referer=").append(referer);
        sb.append(", inTime=").append(inTime);
        sb.append(", outTime=").append(outTime);
        sb.append(", pop=").append(pop);
        sb.append(", advertisementDefault=").append(advertisementDefault);
        sb.append(", createUser=").append(createUser);
        sb.append(", modifyUser=").append(modifyUser);
        sb.append(", createTime=").append(createTime);
        sb.append(", modifyTime=").append(modifyTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}